<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <title>列表</title>
  <meta name="renderer" content="webkit" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  <link rel="stylesheet" href="../../static/lib/layui/css/layui.css" media="all" />
  <link rel="stylesheet" href="../../static/css/admin.css" media="all" />
</head>

<body>
  <div id="TMM_app">
    <div class="layui-fluid">
      <div class="layui-card">
        <div class="layui-form layui-card-header tmm-admin-card-header-auto tmm-filter-form">
        <div class="layui-card-body">
          <table id="tmm-doctors-table" lay-filter="tmm-doctors" class="layui-table"></table>
        </div>
      </div>
    </div>
  </div>

  <script src="../../static/lib/layui/layui.js"></script>
  <script>
    layui
      .config({
        base: "../../static/js/"
      })
      .extend({
        index: "index"
      })
      .use(["index", "table", "laydate"], function () {
        var $ = layui.$,
          admin = layui.admin,
          view = layui.view,
          table = layui.table,
          form = layui.form;
          laydate = layui.laydate,

          laydate.render({
            elem: "#time",
            type:'datetime'
          });



        $(".layui-btn.tmm-admin-btn-tags").on("click", function () {
          var type = $(this).data("type");
          active[type] ? active[type].call(this) : "";
        });

        table.render({
          elem: "#tmm-doctors-table",
          skin: 'nob',
          size: 'lg',
          height: 'full-280',
          even: true,
          page: true,
          limit: 20,
          limits: [10, 20, 50],
          url: "${path}/bank/list",
          cols: [[
            {field:'id',title: 'ID', width:'6%'},
            {field:'bank_name',title: '名称', width:'7%'},
            {field:'bank_url_img', title: '头像',width:'6%',templet:function (d) {
                var html ='暂无图片';
                if(d.bank_url_img!=null && d.bank_url_img!=''){
                  html = '<img src="'+d.bank_url_img+'" style="height: 40px;"/>';
                }
                return html;
              }},
            {field:'remark', width:'40%',title: '备注'},
            {field:'supportCreditCard', title: '贷记卡',width:"8%",templet:function (d) {
                var html ='不支持';
                if(d.supportCreditCard=='Y'){
                  html = '支持';
                }
                return html;
              }},
            {field:'supportDebitCard', title: '借记卡',width:"9%",templet:function (d) {
                var html ='不支持';
                if(d.supportDebitCard=='Y'){
                  html = '支持';
                }
                return html;
              }},
            {field:'status', title: '状态/群主',width:"9%",templet:function (d) {
                var html ='正常';
                if(d.status==2){
                  html = '禁用';
                }
                return html;
              }},
            ]],
          done: function(res, curr, count){
              $(".layui-table-main  tr").each(function (index ,val) {
                  $($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height());
              });
          },
          text:{none:"暂无数据"},
        });
        //查询
        $('#query').on('click', function(){
            table.reload('tmm-doctors-table', {
                page: {
                    curr: 1 //重新从第 1 页开始
                }
                ,where: {
                    mobile:$("#mobile").val(),
                    status:$("#status").val(),
                    id:$("#uid").val()
                }
            }, 'data');
        });
      });
  </script>
</body>

</html>